|
You're also not asking a question that has a direct answer. MFC is a bunch of classes/wrappers that make Win32 programming easier for C++. VB has access to about 90% of the Win32 API.
What are you thinking of doing?
RageInTheMachine9532
|
|
|
|
|
Why only 90%? In my humble experience, there are no WIN32API calls that cannot be made throuhg VB - at the end of the day, the WIN32 API itself is just a collection of C dlls - admittedly, it is necessary to funk about with custom types etc from time to time, but there you go - if you use a screwdriver to hammer a nail, you expect it to be difficult!
Totally open to correction on this one BTW....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
(VB.NET not included!) I was thinking more along the lines of mere mortal abilities. Multithreading, Shell Extensions, drivers, and such, are beyond the capabilities of VB6, or at least capable of being done by mere mortals! . VB6 and below can only make ActiveX .DLL's. Not, IMHO, the more useful library .DLL's we all love to use.
RageInTheMachine9532
|
|
|
|
|
Actually, Multithreading is possible in VB - have done it before - fairly straightforward in fact (and within the reach of a mere mortal (which is how I'd classify myself lol!) Ditto shell extensions. Drivers - yeah well, good point! Seem to remember that there is actually a way to do a straight .dll in VB, but may be wrong on that one!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I'm finding problems with transfering Large Files using TCPListener and TCPClient Sockets.
Need help urgently!
|
|
|
|
|
Hi,
Is there a way to compile my VB6 project on a machine that does not contain the VB6 IDE? I've copied all of the files over and thus ported the VB6 environment, but I'm still having hang-ups. Has anyone crossed this bridge before?
Thanks!
|
|
|
|
|
It would be nothing like easy. You would have to have VB compiler and the linker console apps and would have to set all the compiler switches yourself.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
You also have to port over the environment variables that get set, registry entries, path statement, any controls that your compiling with must be registered, ...
It's alot less time consuming to just install the thing...
RageInTheMachine9532
|
|
|
|
|
If you have VB6 installed yourself anyway, wouldn't it be easier to just build it on your machine and use the resulting images - and in any case, simply copying files from one machine to another will NEVER work for anything more complicated than a standalone .exe - will need to register all sorts of components, ensure that the runtime files are present - big headache!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi folks,
I am kinda new to this .NET world. I am basically trying to inherit datagrid and create a class library with custom events and functions. Everything works fine expect when i make anychanges to the datagrid properties in design mode using the properties window. It comes up saying 'Object not set to an instance'. I am able to manipulate the code programatically, but not able to set any properties to my derived datagrid control in desing mode.
Did anybody had any similar experience??
|
|
|
|
|
The following code are printing the selected row from a fleggrid:
srow = fgrid1.Row
Col = fgrid1.Col
For i = 1 To (fgrid1.Cols - 1)
Printer.Print fgrid1.TextMatrix(0, i) & ": " & fgrid1.TextMatrix(srow, i)
Next
I can't figure out how to print all row from a grid. Please help me
|
|
|
|
|
Try this code
Private Sub Cmdprint_Click()
'grdDetailReport(Name of the grid control)
Dim i As Integer
Dim defaultGridStyle As Integer
Dim defaultFixedGridStyle As Integer
Dim picGrid As StdPicture
Dim defaultFontsize As Single
' Initalize Variables
hl = grdDetailReport.HighLight ' Save current settings.
tr = grdDetailReport.TopRow
lc = grdDetailReport.LeftCol
X = 0
Y = 0
defaultGridStyle = grdDetailReport.GridLines
defaultFixedGridStyle = grdDetailReport.GridLinesFixed
Printer.Orientation = 2
Printer.Font.Size = 18
Printer.Font.Bold = True
'Printer.Print label1.Caption
grdDetailReport.Redraw = False
' Highlight off
grdDetailReport.HighLight = 0
Printer.Font.Size = 10
Printer.Font.Bold = False
Do Until X - grdDetailReport.Rows >= -2
X = X + 45
Y = Y + 1
Printer.Print "Page " & Y
If X > grdDetailReport.Rows - 1 Then
grdDetailReport.Row = X - 44
grdDetailReport.Col = 0
grdDetailReport.RowSel = grdDetailReport.Rows - 1
grdDetailReport.ColSel = grdDetailReport.Cols - 1
Else
grdDetailReport.Row = X - 44
grdDetailReport.Col = 0
grdDetailReport.RowSel = X
grdDetailReport.ColSel = grdDetailReport.Cols - 1
End If
For i = grdDetailReport.FixedRows To grdDetailReport.Rows - 1
If i < grdDetailReport.Row Or i > grdDetailReport.RowSel Then
grdDetailReport.RowData(i) = grdDetailReport.RowHeight(i)
grdDetailReport.RowHeight(i) = 0
End If
Next
For i = grdDetailReport.FixedCols To grdDetailReport.Cols - 1
If i < grdDetailReport.Col Or i > grdDetailReport.ColSel Then
grdDetailReport.ColData(i) = grdDetailReport.ColWidth(i)
grdDetailReport.ColWidth(i) = 0
End If
Next
' Scroll to top left corner.
grdDetailReport.TopRow = grdDetailReport.FixedRows
grdDetailReport.LeftCol = grdDetailReport.FixedCols
' Copy picture.
Clipboard.Clear
On Error Resume Next
grdDetailReport.PictureType = 0 ' Color.
Clipboard.SetData grdDetailReport.Picture
If Err <> 0 Then
grdDetailReport.PictureType = 1 ' Monochrome.
Clipboard.SetData grdDetailReport.Picture
End If
With flxGrid
Set picGrid = Clipboard.GetData(vbCFBitmap)
End With
grdDetailReport.GridLines = defaultGridStyle
grdDetailReport.GridLines = defaultFixedGridStyle
Printer.PaintPicture picGrid, Printer.CurrentX, Printer.CurrentY
Printer.NewPage
' Restore control.
For i = grdDetailReport.FixedRows To grdDetailReport.Rows - 1
If i < grdDetailReport.Row Or i > grdDetailReport.RowSel Then
grdDetailReport.RowHeight(i) = grdDetailReport.RowData(i)
End If
Next
For i = grdDetailReport.FixedCols To grdDetailReport.Cols - 1
If i < grdDetailReport.Col Or i > grdDetailReport.ColSel Then
grdDetailReport.ColWidth(i) = grdDetailReport.ColData(i)
End If
Next
grdDetailReport.TopRow = tr
grdDetailReport.LeftCol = lc
Loop
' Print commands
Printer.EndDoc
' Restore grdDetailReport
grdDetailReport.HighLight = hl
grdDetailReport.Redraw = True
End Sub
|
|
|
|
|
I copyed your code into my program and it working only 50 %.
1. When I select the first row it is printed fine, but when I am trying to print the next selected row it fails(nothing happend).
2. Also it is printing the only visible column what about the invisible columns?
Thanks
|
|
|
|
|
in keypress event i can check keyascii to see what a user has pressed but it doesnt include up/down/right/left.
Anyone know how i can catch these please ?
Many thanks
|
|
|
|
|
You have to use the KeyDown event because the KeyPress event only registers keys that represent characters.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi all,
I have a process that run lame.exe to encode an mp3. What I am trying to do is catch the ouput from lame and display it in a textbox. So what i did was this:
<br />
'create a new process<br />
Dim p As New Process()<br />
p.StartInfo.RedirectStandardOutput = True<br />
p.StartInfo.UseShellExecute = False<br />
p.StartInfo.FileName = "C:\Lame\encoder.bat"<br />
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden<br />
p.Start()<br />
p.WaitForExit()<br />
mainForm.txtResult.Text = p.StandardOutput.ReadToEnd<br />
p.Close()
This doesn't produce any errors, but it doesn't work either. I basically just want to show the user that something is happening. Ideally I would like to have a progressbar but i can't think of a way to measure the progress of the process. Anyway, if you can help that would be much appreciated.
/**
* @author Jachin
*/
|
|
|
|
|
Hi, trying to make an instalation with package and deployment wizard and everything seams to work fine but there is one smal question.
I would like to install a usb driver together with my aplication witout the need to insert the USB device. I have a .inf for the device file but how to run/install this with visual basic code from the pack.&dep. project?
regards Me
|
|
|
|
|
I have an application that has a web browser control (VB6) in a vb.net app. How can I write a javascript action that will call a function/sub or fire an event in the vb.net app containing the browser control. e.g. htm source code: <input type="button" value="Test" onclick="CodeThatWillPassIntoVBApp('DataToSendToApp')">.
<script>
function CodeThatWillPassIntoVBApp(DataToSendToApp)
{
//As if by magic - data is sent to vb.net app
}
</script>
Jim
|
|
|
|
|
|
Hello all,
I have an Access 2000 database. On a table called "Images" I have a field called "Link to Images." This field is hyperlink to some imgae files I have. The hyperlink name is generated based on an ID number given to them as they are entered to the database (the number increases sequentially).
I made a program that will take the ID number of it and create the appropriate hyperlink name. The problem is though, it doesn't create an actual hyperlink. The field gets changed to what I want, but it is not an ACTUAL hyperlink to the file.
Is there a way to write a program that will automatically create the hyperlink? I don't want to sit and manually type the name of 900+ images into my database.
Nickone
nickmthughes@hotmail.com (just in case you have a question)
|
|
|
|
|
Anonymous wrote:
The field gets changed to what I want, but it is not an ACTUAL hyperlink to the file.
What do you mean by this? What makes it not be an actual hyperlink? The fact that it isn't clickable? If so, all you have to do is change the data type to hyperlink in the table's design view.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Sorry maybe I wasn't clear. I wrote a Standard EXE VB program that connects to my database. In the Database, I have a field that are hyperlinks. Thus if I open the table, and click on the hyperlink, it opens the image.
So let's say I open my Table, and run the code, then I can see the hyperlink name change to what I want. My problem exists where when I go back and click on the link, nothing happens.
So I right clicked on the hyperlink in the Table and looked at the Hyperlink properties. The "Text to Display" has been changed by my program, but the hyperlink itself is blank. Basically the hyperlink is there, but it no longer actually links to anything. If I go through and reenter the hyperlink manually this way, it defeats the purpose of my program.
Any ideas?
It'd be really great if I could get this to work.
Thanks
Nick
nickmthughes@hotmail.com
|
|
|
|
|
Could you post the code you use to actually do the changing?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
I have the flexgrid. When the row is selected I am assigning value to the text box array.
Text1(0).Text = fgrid1.TextMatrix(Y, 1)
As you can see I am taking each column and assign the value to a text box.
instead of assigning the value of each column to a text box is it any other way to do it?
|
|
|
|
|