|
While I have been developing a windows app in vb.net, I add a toolbar to the main form. I also wrote "Application.EnableVisualStyles()" at the Sub New().
Then an amazing thing happend. I lost my icons for the toolbarbuttons at run time. But when I delete the line "Application.EnableVisualStyles()" I regained the icons. What's the wrong right there? How should I overcome it?
Thank you in advance.
Anindya Chatterjee
|
|
|
|
|
This is a bug in .Net 1.1, you have to call Application.DoEvents after EnableVisualStyles. Also you should use a Sub Main like this:
Shared sub Main
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(MyForm) '<-- Put the name of your main form here
End Sub If you use a Sub Main, don't forget to change the Startup Object to Sub Main in the Solution explorer -> Properties -> Startup Object.
Hope this helps!
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Train free @Microsoft
Got to this link and register free for
training your self for VS2005
https://www.microsoftelearning.com/visualstudio2005/
or
http://www.financialexpress.com/latest_full_story.php?content_id=107645
Microsoft dont give anything free except training
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
You posted this thing acrossed how many forums?? Bad practice man...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wanted everone to take the advantage
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
the lounge is the only place for every one to get general infos as the last threads are reported to the home page of CodeProject...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Well, I am glad you placed your message here.
Thanks.
|
|
|
|
|
hellow to all ..
i am looking for a way to Color a specific Row or Column in datagrids ...
let say if it have a specail parameters , that i take from the tabel ..
how can i do that ?
thanks for any help ?
|
|
|
|
|
Are you using datagrid or datagridview?
Datagridview seems to have more 'stuff' you can do to it.
DataGridView1.Rows(0).DefaultCellStyle.BackColor = Color.LightGray
1000 monkeys at a 1000 computers for 1000 years = 1 working apps.
|
|
|
|
|
i am using datagrid ,
this option i do not have it in datagrid ..
what is datagridview is it the same as datagrid ?
|
|
|
|
|
Datagridview has just about taken over from datagrid in vb express 2005.
Get a free copy from Mircosoft website. I find datagridview much easier to handle and do with what I like.
Hope this helps
1000 monkeys at a 1000 computers for 1000 years = 1 working apps.
|
|
|
|
|
thxx man ..
that's help me a lot ..
|
|
|
|
|
Dim col1 As New DataColumn
Dim col2 As New DataColumn
Dim col3 As New DataColumn
DataGridView1.DataSource = tbl
col1.ColumnName = "ID"
col1.Caption = "ID"
tbl.Columns.Add(col1)
col2.ColumnName = "Name"
col2.Caption = "Name"
tbl.Columns.Add(col2)
col2.ColumnName = "Age"
col2.Caption = "Age"
tbl.Columns.Add(col2)
DataGridView1.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.LightSkyBlue
DataGridView1.Columns(1).DefaultCellStyle.BackColor = Color.LightSkyBlue
DataGridView1.Columns(2).DefaultCellStyle.BackColor = Color.LightSkyBlue
Dim r As DataRow
j=1 to 10
r = tbl.NewRow
tbl.Rows.Add(r)
r = tbl.Rows(j-1)
r("ID") = j
Next
'something like this should help
etc etc
Delighted to have been able to help
Nige
1000 monkeys at a 1000 computers for 1000 years = 1 working apps.
|
|
|
|
|
col2.ColumnName = "Age"
col2.Caption = "Age"
tbl.Columns.Add(col3) ' sorry wrong columb name here
1000 monkeys at a 1000 computers for 1000 years = 1 working apps.
|
|
|
|
|
Like I say in my signature try and try again: 3's not 2's
col3.ColumnName = "Age"
col3.Caption = "Age"
tbl.Columns.Add(col3)
1000 monkeys at a 1000 computers for 1000 years = 1 working apps.
|
|
|
|
|
If anybody has an help on crystal reports plz send it as soon as possible.
I need it urgently .such as txtfiles or any other pdf files .
Thankful.
|
|
|
|
|
I am trying to install an application developed in VB6 (English version) in
Win/2000 "SPANISH Version"
While installing the application it give error you are trying install
English Version of the DLL By removing SPANISH version ( something simliar
to that effect...)
Does anyone can pointout the SPANSIH version files for the following:
1) MSCPXL32.dll
2) msorcl32.dll
3) odbccp32.cpl
4) odbcint.dll
I have created thge package with IExpress & win/2000 (English) version many users are using.. NO PROBLEM.
Some how Cannot install Win/2000 Spanish
5) Does Microsoft has a Different MDAC for Spanish version of Window/2000?
Appreciate any help in advance!
s pereira
-- modified at 16:51 Monday 7th November, 2005
|
|
|
|
|
Hi, I am trying to set the attributes for an entire tree for subfolders using VB 6.0, like it’s done in Explorer if you select “Apply changes to this folder, subfolder”.
The only way I can do this so far is to loop at each level. The following script is just getting me two levels down.
Does anyone a trick in changing the attributes on a folder that would replicate down to all levels of children? I have not found any posting where this was ever accomplished. So it would take a very smart person to figure this one out. ;- )
Thanks for sharing my problem and thinking about it.
Function File_Check()
'Test if the folders are read-Only
Dim objFSO, objFolder, colFiles, objFile, objSub, colSub, objFSO2, objFolder2, colSub2, objSub2, colFiles2, objFile2, colFiles1, bypass As Integer
Const ReadOnly = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("G:\Internal")
Set colSub = objFolder.SubFolders
Set colFiles = objFolder.Files
For Each objFile In colFiles
If objFile.Attributes And ReadOnly Then
objFile.Attributes = objFile.Attributes Xor ReadOnly
End If
Next
For Each objSub In colSub
Set colFiles1 = objSub.Files
For Each objFile In colFiles1
If objFile.Attributes And ReadOnly Then
objFile.Attributes = objFile.Attributes Xor ReadOnly
End If
Next
'Repeat one layer down.
Set colSub2 = objSub.SubFolders
For Each objSub2 In colSub2
Set colFiles2 = objSub2.Files
For Each objFile2 In colFiles2
If objFile2.Attributes And ReadOnly Then
objFile2.Attributes = objFile2.Attributes Xor ReadOnly
End If
Next
Next
Next
End If
End Function
|
|
|
|
|
hello there, I am new to programing
I have a problem, I imported the file Authentication.dll and it's under Reference in the solution window.
However, when I try to use it as a funtion I get this blue line with message the Authentication is namespace and it's not valid. I tried puting imports statement as you can see below, but it still didn't work. The authentication.dll suppose to check if name and password are good and return true/false.
Imports Authentication
Public Class Login_Control
Inherits System.Windows.Forms.UserControl
Public Event allowed()
Public Event Denied()
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
Dim name, password As String
name = txtUserName.Text
password = txtPassWord.Text
If Authentication("name", "password") = True Then
End If
End Sub
|
|
|
|
|
Hi there,
EliBoby wrote: name = txtUserName.Text
password = txtPassWord.Text
If Authentication("name", "password") = True Then
it looks like that u are using the namespace's name as a method
<< >>
|
|
|
|
|
O,K
so authentication is namespece. So what I need to write to single VB.NET that I want to use the function authentication.dll?
thank you for responding so fast
eliboby
|
|
|
|
|
just simply call functions exposed from that DLL in ur application
<< >>
|
|
|
|
|
I am sorry but I just don't understand.
the function and the dll are both called Authentication, how can I call it without writing it?
Can you give me an example?
|
|
|
|
|
EliBoby wrote: the function and the dll are both called Authentication, how can I call it without writing it?
Since I dont know much about VB.NET , but generally to use a dll, just simply follow these steps
did u have Authentication.dll ?
if so...
- create a project
- add a reference to that dll
- in ur project call dll's functions
<< >>
-- modified at 18:40 Friday 4th November, 2005
|
|
|
|
|
This is exactly what I did, and I still getting this blue line, that tell the my function name isn't a method.
Can you send me a simple code example, so I can see what I do wrong?
thank for your help
|
|
|
|