Click here to Skip to main content
15,891,943 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Error message... 2K/XP Pin
LaFéeClochette19-Nov-04 2:25
LaFéeClochette19-Nov-04 2:25 
GeneralRe: Error message... 2K/XP Pin
LaFéeClochette23-Nov-04 9:16
LaFéeClochette23-Nov-04 9:16 
GeneralRe: Error message... 2K/XP Pin
LaFéeClochette23-Nov-04 9:17
LaFéeClochette23-Nov-04 9:17 
GeneralActive Directory User Object Problem Pin
x900018-Nov-04 5:36
x900018-Nov-04 5:36 
QuestionHow to Make Setup with Product Key Pin
Murtuza Husain Miyan Patel18-Nov-04 4:31
professionalMurtuza Husain Miyan Patel18-Nov-04 4:31 
AnswerRe: How to Make Setup with Product Key Pin
Mekong River18-Nov-04 20:43
Mekong River18-Nov-04 20:43 
GeneralDisplaying DXF or DWG files... Pin
liddicott18-Nov-04 4:01
liddicott18-Nov-04 4:01 
GeneralRe: Displaying DXF or DWG files... Pin
Chaos Machine18-Nov-04 12:39
Chaos Machine18-Nov-04 12:39 
Hello Simon,

Ok I have done something similar for my company. You can go 2 ways.
First way: Using the OCX control called DWGTHUMBNAIL.OCX. This one can only see DWG and in a small preview window. It should be part of your AutoCAD. If not you can look on the internet. I don't remember from the top of my head for the address though. Any ways. The code for first way:

'===========================================
Private Sub File1_Click()
On Error Resume Next
File1.SetFocus
DwgThumbnail1.Visible = True
If Right(File1.Path, 1) = "\" Then
fullpath = File1.Path & File1.List(File1.ListIndex)
Else
fullpath = File1.Path & "\" & File1.List(File1.ListIndex)
End If
DwgThumbnail1.DwgFileName = fullpath
End Sub
DwgThumbnail1.DwgFileName = fullpath
'===========================================

DwgThumbnail1 = The name of the control DWGTUMBNAIL.OCX in your form
File1 = The FileListBox control
fullpath = the path of your dwg drawing.

Second way:
Using a OCX control from Invisio. I am not sure if this control is freeware or not. Please check before use.
Code for this:
//==============================================
Private Sub File1_Click()
On Error GoTo Err_han
If Right(File1.Path, 1) = "\" Then
fullpath = File1.Path & File1.List(File1.ListIndex)
Else
fullpath = File1.Path & "\" & File1.List(File1.ListIndex)
End If

DwgThumbnail2.FileName = fullpath


Exit Sub

Err_han:
MsgBox "File is in use. Please try later.", vbInformation, "File in use"
//========================================

DwgThumbnail2 = the name of the INVISIO.OCX control in your form.
File1 = The FileListBox control
fullpath = the path of your dwg drawing.

Please not that the above code work OK in VB6. I haven't tryed it in VB.NET but i don't think it would be any problems. Hope this helps.



Still trying to find the way
GeneralMultiple selection in MSFlexGrid Pin
balajeedurai17-Nov-04 22:27
balajeedurai17-Nov-04 22:27 
GeneralRe: Multiple selection in MSFlexGrid Pin
Mekong River18-Nov-04 20:47
Mekong River18-Nov-04 20:47 
GeneralRe: Multiple selection in MSFlexGrid Pin
balajeedurai18-Nov-04 21:26
balajeedurai18-Nov-04 21:26 
Generallinklabel in RichTextBox Pin
Sumit Domyan17-Nov-04 19:40
Sumit Domyan17-Nov-04 19:40 
GeneralImage Control Pin
Raza Ashraf17-Nov-04 14:58
Raza Ashraf17-Nov-04 14:58 
GeneralRe: Image Control Pin
SSSSSS417-Nov-04 19:13
SSSSSS417-Nov-04 19:13 
GeneralRe: Image Control Pin
MohammadAmiry18-Nov-04 0:02
MohammadAmiry18-Nov-04 0:02 
GeneralRe: Image Control Pin
bat-nuco18-Nov-04 3:07
sussbat-nuco18-Nov-04 3:07 
GeneralRe: Image Control Pin
Mekong River18-Nov-04 20:55
Mekong River18-Nov-04 20:55 
GeneralOleCreatePictreIndirect VB6 to VB.NET Pin
djw117-Nov-04 11:14
djw117-Nov-04 11:14 
GeneralDisconnected Data: Help! Pin
Rommel the iCeMAn17-Nov-04 11:04
Rommel the iCeMAn17-Nov-04 11:04 
GeneralRe: Disconnected Data: Help! Pin
R. Thomas17-Nov-04 19:36
R. Thomas17-Nov-04 19:36 
GeneralRe: Disconnected Data: Help! Pin
Rommel the iCeMAn18-Nov-04 2:55
Rommel the iCeMAn18-Nov-04 2:55 
GeneralLook for custom Printing/Report Pin
AstronusX17-Nov-04 9:59
AstronusX17-Nov-04 9:59 
Generaladdins for photoshop Pin
shinay17-Nov-04 8:19
shinay17-Nov-04 8:19 
GeneralVisual Basic and Microsoft Access Pin
underb@asd20.org17-Nov-04 8:18
underb@asd20.org17-Nov-04 8:18 
GeneralOLD TAPI CONTROL Pin
John R. Shaw17-Nov-04 6:28
John R. Shaw17-Nov-04 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.