I have set all cells (column headers, row cells) of the Datagridview to 8.25 tahoma. When the form is resized, all the column header fonts are resized, but the rowcells remains at 8.25. I checked and set all the dgv font properties that I can think of (defaultcellstyle ...
Ok, I had this code working by implementing a close() function on all my user controls
Public Function clone() As usrCtl1
Return DirectCast(Me.MemberwiseClone(),usrCtl1)
End Function
private sub dosomething(uc as UserControl)
Dim myUC as New Object
for i as integer = 0 to 3
myUC...
I created a bunch of usercontrol that I need to pass to a generic procedure that will copy and place them on a form.
something like this:
dosomething(usrCtl1)
dosomething(usrCtl2)
dosomething(usrCtl3)
I tried this code but did not work.
private sub dosomething(uc as UserControl)
for i...
Environment: Visual Studio 2015 / .net 4.5.1
I am trying to create an excel file from my vb.net application.
I am populating the file with database records.
I was able to populate column A, but could not populate the rest of the columns.
I got the code from docs.microsof.com and the code is...
Thank you very much for the quick and helpful response.
I was already able to successfully load an excel file using the MS ACE Driver with this code:
Set @strsql = 'Select * ' +
'From openrowset('Microsoft.ACE.OLEDB.12.0'',''Excel 12.0 xml;HDR=No;IMEX=1;' +
'Database=.....' +
'Select * From...
Environment is : SQL Server 2012 and Access 2000 database
Here is my code:
IF OBJECT_ID('tempdb..#temptable') IS NOT NULL DROP TABLE #temptable;
create table #temptable
(
[LastName] varchar(50)
,[FirstName] varchar(50)
)
INSERT INTO #temptable
Select tbl1.LastName, tbl1.FirstName FROM...
I was hoping somebody can help mw with this, as I have been working on this for the past couple of days now.
I am trying to automate unzipping of files as follows:
Dim pinfo As New ProcessStartInfo
pinfo.FileName = "C:\Program Files\7-Zip\7z.exe"
Dim zipFile As String =...
I have a sql table with these data
Year Country Ranking Category
2018 Ghana 1 Swimming
2018 Sweden 2 Swimming
2018 Costa Rica 3 Swimming
2018 Jordan 1 Sprint
2018 Thailand 2 Sprint
2018 Finland 3 Sprint
2018 Myanmar 1 Boxing
2018 Peru 2 Boxing
2018 Belgium 3 Boxing
2017...
I have an xml file that has the following entries:
<Permission>
<FormName>MainMenu</FormName>
<ControlName>Submit</ControlName>
<ControlProperty>Enabled</ControlProperty>
<Supervisor xml:space="preserve">TRUE</Supervisor>
<EXAMINER xml:space="preserve"> </EXAMINER>...
Need to lock a record after I select it and unlock it (even without updating).
I also need to check if record is lock.
Been googling this for quite some time now, found some articles on locking row from table but not from a view.
When I implement on my view, did not seem to work.
BEGIN TRAN...
I have multiple datagridview in my form, each bound to different list (of generic objects).
I need to create one routine to sort (thru Column Header Click) of any of these datagridviews.
I have a code that hard-code the field of the datasource as:
_dsrc.OrderBy(Function(x) CInt(x.ID)).ToList...
I set-up the properties of a combobox in design time as follows:
DropDownStyle = DropDown
AutoCompleteMode = SuggestAppend
AutoCompleteSource = ListItems
I do not have an event for this combobox.
Works fine, until I make a selection and somehow it triggered a button click, which is a database...
I have a form (A) that has a hyperlink to an edit form (B).
I would like to see the changes reflected on form A, after I have edited the records on form B. I have this code in from B,
A.Activate()
A.Show()
A.btn1.PerformClick()
This works, but opens another instance of...
My fault, by not being careful with my pseudo-code, but the problem I am having is evaluating different columns depending on the value of @param3.
I believe this will work,
....
AND (@param3 is null or col3 = case when @param3 = 1 then 2
else 3...
I am writing a sql server stored procedure that get passed multiple parameters.
For one of the parameter, I have this pseudo-code
.....
where (@param1 is null or col1 = @param1)
and (@param2 is null or col2 = @param2)
and (@param3 is null or (case when @param3 = 1 then...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.