|
You don't!! You use the Extract icon method to get the icons out of the file, just like Shell32 does. Shell32 won't pick the icon for your, but it will tell you what type each drive is. You then have to use that information to pick the icon to show.
What do you need to determine the drive type? Easy! Call the Win32 Api function <a href="http://msdn.microsoft.com/library/en-us/fileio/fs/getdrivetype.asp?frame=true" rel="nofollow">GetDriveType</a>[<a href="http://msdn.microsoft.com/library/en-us/fileio/fs/getdrivetype.asp?frame=true" target="_blank" rel="nofollow" title="New Window">^</a>] , or <a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/RealDriveType.asp?frame=true" rel="nofollow">RealDriveType</a>[<a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/RealDriveType.asp?frame=true" target="_blank" rel="nofollow" title="New Window">^</a>] .
You can find the P/Invoke Declares on P/Invoke.net if you have trouble figuring it out, or you could just ask...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 21:29 Saturday 11th February, 2006
|
|
|
|
|
Hello
my english is not good; escuse me for that.
I'd like to know how can I import my phonebook from outlook express to my database; I'm using ms access 2003 and VBA.
thanks
|
|
|
|
|
Without getting into the overly-convoluted and gory details of calling the Win32 Api functions to export the address book...
Go into Outlook Express, click the File menu, Export, and export the address book to a Text (CSV) file. You can the easily go into Access and import the data from that file.
But, if you must do this in code, there is only one place to get the API documention anymore, here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am unable to set parameter to crystal report. Report source is SQL Server Stored Procedure. Please help me.
|
|
|
|
|
Is there any grid control in vs 2003 along with DataGrid. I want to use DataGridView in VS2003
|
|
|
|
|
Can't do it. Visual Studio 2003 will NOT use the classes in the .NET Framework 2.0. You'll have to use VB.NET 2005 to use that control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hellow ..
i am doing reports in the crystal ...
i need to run them on differnt databases , but when i do the report i bind them to the DB server in my computer ...
then when i run it on other computers it ask for logon information beacause the server name there is defrent but the same tabels .
i know there is a databaselogon command in the vb.net , but it is not working for me ..
anyone have suggestion or can offer a sample code ?
thxx
|
|
|
|
|
Try This . But This is not the best way. But u don't have no other way. Try it.
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
' Create a report document instance to hold the report
Dim rptStudent As New ReportDocument
Try
' Load the report
rptStudent.Load("D:\sample_project\report\rptlist.rpt")
' Set the connection information for all the tables used in the report
For Each tbCurrent In rptStudent.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = "ServerName"
.UserID = "username"
.Password = "pws"
.DatabaseName = "DBName"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
' Set the report source for the crystal reports
' viewer to the report instance.
frmrpt.crptdate.ReportSource = rptStudent
' Where I put the selection formula
frmrpt.crptdate.SelectionFormula = selectionstr
' Zoom viewer to fit to the whole page so the user can see the report
frmrpt.crptdate.Zoom(2)
Catch Exp As LoadSaveReportException
MsgBox("Incorrect path for loading report.", _
MsgBoxStyle.Critical, "Load Report Error")
Catch Exp As Exception
MsgBox(Exp.Message, MsgBoxStyle.Critical, "General Error")
End Try
!alien!
|
|
|
|
|
wow , alien that's great ...
u just saved my life
yesterday i been around the net for 6h , looking for the answer , and didn't find , and in 2 lines u had solve my problems
|
|
|
|
|
i m trying to use local keyboard layout file which contain local input method's.
i have a problem to use and/or call .KBD [keyboard layout file]in visual basic 6
Pleae help me
Please Help Me.
justzain
|
|
|
|
|
You don't read or call a ".KBD" File, and as far as I know, they can be used only in win9x. (NT uses .DLL files.)
There is an example on a link at the bottom of this page.
(It assumes you have already put in the registry entries, where windows expects them.)
http://mentalis.org/apilist/LoadKeyboardLayout.shtml[^]
progload
|
|
|
|
|
I'm trying to make a new windows form through a timer elapsed event
one form runs the timer that trigger the event and pops another form
BUG: the poping form will not shou form elements like buttons or labels
does anyone know what I am doing wrong??? (code bellow)
'''create timer instance
Private t As New System.Timers.Timer(2000)
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
'''handler call TimerFired bellow
AddHandler t.Elapsed, AddressOf TimerFired
End Sub
Public Sub TimerFired(ByVal sender As Object, _
ByVal e As System.Timers.ElapsedEventArgs)
''creates anew instance of the second form
Dim form2 As New Form2
''when it show, the canvas is ok, but the elements are like a missing hole
form2.Show()
t.Enabled = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
t.Enabled = True
End Sub
End Class
AM I INSTANTIATING OT DECLARING SOMETHING WRONG?
|
|
|
|
|
The problem is you're using the wrong Timer. The callback from the Timer is run on a seperate thread, therefor, you're creating your new form on a seperate thread which will have no access to the app's message pump. The form, and it's controls, will not properly receive the WM_PAINT message.
Keep the Form creation on the UI thread (the same thread your StartUp form is created on). Use the Form's Timer control instead. This will fire an event on the same thread as the UI and let you create the new form on that same thread.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks dude, it did work with the form timer
|
|
|
|
|
No problem!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
like in my messenger appn i am getting only the sys no. but not the persons who r using that sys (sys can be used by any persons who have the username ,password created by admin)
it has to get from the userid
|
|
|
|
|
You can't reliably get the logged in user of a remote machine without having a custom component running on the remote machine reporting who is logged in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
so can we create that custom component at remote machine?
thank u
|
|
|
|
|
You'll have to write the ActiveX component (preferrably not in VB.NET!), create an installation package for it, have the user download and install it (if they have permissions to do so!), then execute the component from JavaScript of VBScript in the browser page. The component would have to get this information and post it back to the server in some form.
Do I have any articles on this? No. This is an old ActiveX type project, typically found in VB6.
Why do I not recommend VB.NET? None of the .NET Managed languages support targeting a true ActiveX control. Any component you build in VB.NET will require the web client to have the .NET Framework installed in order to run your component.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to make a base form that has the controls that i want every other form in my program to have...i thought maybe i could just build that form and then have my other forms inherit from it so they would have those same controls and then i could add the extra stuff that the indevidual form needed...but it wont let me open my forms that inherit from the base form in the designer......Im not sure what if anything i can do about this, but if you have any ideas pleas let me know. Thank you in advance
Pablo
|
|
|
|
|
In code window Replace
Inherits System.Windows.Forms.Form
With
Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base
Regards,
Javed
|
|
|
|
|
M Javed Khan wrote: Inherits System.Windows.Forms.Form
With
Inherits frmSetupTemplate 'frmSetupTemplate Name of ur Form which u want as base
Right thats what i was doing...but it wont let me edit the inheriting form in the designer when i do that
Pablo
|
|
|
|
|
You can't edit the inheriting form (at least not the parts that have been inherited). but you should be able to add controls to it and edit those.
My Blog[^] FFRF[^]
|
|
|
|
|
When i inherit a base form and then try to open the new form in the editor i get a balnk screen and in the build errors section it says that no designable items where found
Pablo
|
|
|
|
|
hmmm the control which you want to edit in inherited form make its
Modifier Property Value = "Public" then you will be abe to edit it.
Regards,
Javed
|
|
|
|