|
Yah, I hate this problem and I hope you get a better solution than mine. I created an additional checkbox below the gridview called checkselected.
It has 2 operations:
if there are no rows selected then it forces EVERY row to have its checked value.
If there is 1 or more selected rows it forces the seleced rows to have the checkbox value.
Quote from Great Outdoors:
its a confident traveller who farts in India
|
|
|
|
|
Hi Freinds,
I m working in vb 6.0
I m open a folder from vb but user can move up or down by address bar
so i want to hide or disalbe windows address bar of that folder.
currently for open folder i m using shell function..
Please help me, How can I open folder without address bar (Windows Application).
Thank you
-- modified at 9:56 Thursday 22nd November, 2007
|
|
|
|
|
I think it is not possible to do that. All you can do is that you can have one form that looks similar to window explorer and show this form instead of opening the folder from VB program.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I want to make a chart in Visual Basic 6.0 but I don't want to make it myself. I want it to be imported from Excel for example, but not as a picture. I want it to be dynamic, that means if I chance some data in my data base, the chart will also change.
Thanks!
|
|
|
|
|
Never heard about? If you have Excel then you have it.
See for instance [^], I know it talk about VBA, anyway...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thank you very much Pallini. I managed to make a chart in Word with Visual Basic, by introducing data to chart from my database. But I want to load the chart created in that Word Document in a form in Visual Basic; I don't want to view the chart created in Word, but in Visual Basic.
Can't I create a dinamic chart direct in Visual Basic without using Word or other aplication?
Thank you very much!!
|
|
|
|
|
Hi,
i have created one Chat application where user can send message to other users on the network but right now i am specifying the ip address manually.
So,i want to get Ip asdress of all the machines which are on network.
Pls send me the code if u know this.
Girish
|
|
|
|
|
There's no way to get the list, other than pinging each IP address in the range you want. Even then, that won't get you a list of available clients. You have to try to connect to each of the live IP address to see if a client is listening. This process will take quite a long time to get through any list of addresses.
A better solution would be to have a central server that all the clients check into. This server would then be able to share the known available clients list with all the other clients.
|
|
|
|
|
|
Hi,
Anyone knows how to use login control and how to connect it with the SQl server 2005 and connect to the table within my application database. So it can match the values from the table I have already created in my database.
Rock Star
|
|
|
|
|
|
hi everyone
dears i have created a setup project but while deploying i must install dotnet framework 1.1 and its service pack 1
is there any way that only single setup install all these things ??
Salman Sheikh
|
|
|
|
|
You cannot install it as part of your .MSI setup project. It has to be isntalled seperately. You'd normally have a Setup.exe that your user launches and this .EXE checks for the .NET Framework and installs it if necessary, then lanuches your app's .MSI setup. Google for ".net setup bootstrap[^]" for examples.
|
|
|
|
|
Hi
I have developed an application using WebBrowser control.
In this application the user visits web-sites in WebBrowser control.
Whichever sites he is visiting I am recording all sites along with PostData, Url and Frame information in the collection object.
I’ve kept option to replay the user’s visits. If user wants to see the pages he has visited then he can replay the websites using Replay button.
But I am facing the problems while replaying in following scenarios.
1.If user is visiting the pages and doing steps within same page, ie. He is navigating such that the page remains
same only the data in frames of the page changes. In this case during replay only the page is displayed
while the steps user has done are not displayed.
2.If user is downloading any file from website then while replay that download-file step is not replayed.
Please tell me what can be solution for these problems.
Abhishek J
|
|
|
|
|
hii
How to convert 11/06/2007 to "06-nov-2007". in vb.net ?
|
|
|
|
|
DateTime.TryParse then one of the DateTime to string methods.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
Thanks For reply .
I got the solution ,Directly we can use
Date.Today.ToString("d-MMM-yyyy") to get the way we want
DVS
|
|
|
|
|
Hi guys,
I really need help...
I'm searching for a VB or VBScript code that can print PDF files... I've searched and tried lots of VB code available in the net but none of them works. Or maybe I just don't know how to run them.
Kindly help me about this issue... I'm not really a VB guy but I'm required to used this language. I'm also looking forward to study this language and your guidance will be a great help.
Please give a me functional code that you have tried.
Your help will be highly appreciated
Mon Magallanes
|
|
|
|
|
You need some kind of component to do the printing for you. There is nothing in VB6 or VBScript that can do this on it own.
monmagallanes wrote: I've searched and tried lots of VB code available in the net but none of them works. Or maybe I just don't know how to run them.
If you haven't been able get these to work, how are we going to explain it to you so you understand it?? We'll be telling you the exact same thing you've already seen.
monmagallanes wrote: Please give a me functional code that you have tried.
There's no chance of this happening. CP is here to help you with your own code, not write it for you. Besides, without the components to do the printing, like Acrobat Reader, any code anyone gives you is worthless.
|
|
|
|
|
I have this code (see below) that looks promising...
I run this whole command independently and it runs successfully but when I used it for my new code it displays an Compile Error: Variable Not defined at the following line:
AcroDDEFailed = False
txtAcrobatDDE.LinkMode = 0 <-----------------------ERROR
txtAcrobatDDE.LinkTopic = "acroview|control"
txtAcrobatDDE.LinkMode = 2
By the way, my code who call the function to print is the following:
Sub PrintAdobePDF(sFileName As String)
Dim PDFArray As Variant
ReDim PDFArray(0 To 0)
PDFArray(0) = sFileName
PrintPDFs PDFArray
End Sub
I also have Adobe Reader installed on my PC. And also, as i said earlier, the code below successfully printed a existing pdf file.
Please help me with this issue...
******************** CODE I RESEARCHED *****************************
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Private Sub Command1_Click()
Dim file_name As String
file_name = App.Path
If Right$(file_name, 1) <> "\" Then file_name = file_name & "\"
file_name = file_name & "test.pdf"
Dim PDFArray As Variant
ReDim PDFArray(0 To 0)
PDFArray(0) = file_name
PrintPDFs PDFArray
End Sub
Private Sub PrintPDFs(PDFArray As Variant)
'' Accepts one dimensional array PrintPDFs containing paths to .PDF files to be printed,
'' then silently prints them using DDE. Acrobat Reader does not support OLE, and silent
'' printing through the pdf.oxc has some issues in v5.1 and higher
''
'' pdf.ocx is an unsupported, non-developement tool that is subject to change in functionality.
'' Under Acrobat 5.1 and higher, a warning dialog is displayed each time printAllFit() is called.
'' If "Do not ask me again" is selected, printing from script will *fail* unless the user opens
'' acrobat reader, goes to tools>options and "Resets all warnings".
'' "Do not ask me again" is stored in:
'' HKCU\Software\Adobe\Acrobat Reader\5.0\AVAlert\cCheckbox\cEWH\iWarnScriptPrintAll
'' HKCU\Software\Adobe\Acrobat Reader\6.0\AVAlert\cCheckbox\cEWH\iWarnScriptPrintAll
''
'' This sub requires:
'' - PDFArray starts at row 0, not row 1
'' - TextBox txtAcrobatDDE
'' - declaration of API function FindExecutable
''
'' ** WILL NOT WORK FROM AN ACTIVEX DLL **
''
On Error GoTo ErrHandler
Dim Error282Count As Integer '' Count of "Can't open DDE channel" errors
Dim AcroDDEFailed As Boolean '' Set to true if a DDE connection cannot be established
Dim sPDFPath As String '' Path to a PDF file
Dim sCmd As String '' DDE command
Dim lStatus As Long '' response from ShellExecute command
Dim n As Integer '' for iterating
Const Max282Errors = 6 '' Number of times we will ignore "Can't open DDE channel" errors
'' before accepting the fact that Acrobat is not started. We need
'' to test more than once, because it might just be busy loading
Dim sAcroPath As String '' Path to acrobat, determined by FindExecutable
Dim bCloseAcrobat As Boolean '' If we open acrobat, we will close it when we are done
'' If acrobat is already running (and hidden), shelling it will cause it to be shown.
'' We do not want that. So try a DDE connect, which will fail if acrobat is not running
'' I have looked at other API means of testing this, but it may be running as a process (no window)
'' and there does not seem to be many graceful ways of testing for this.
Error282Count = Max282Errors '' we only need to try once to see if it is already running.
AcroDDEFailed = False '' ErrHandler will set to true if Acro is not running
txtAcrobatDDE.LinkMode = 0 '' Close any current DDE Link
txtAcrobatDDE.LinkTopic = "acroview|control" '' Acrobat's DDE Application|Topic
txtAcrobatDDE.LinkMode = 2 '' Try to establish 'Manual' DDE Link. This will fail
'' if Acrobat is not ready (or in this case, not running)
If AcroDDEFailed = True Then
'' We could not set our linkmode, so Acro is not running. Find it and launch it
sPDFPath = PDFArray(0) '' grab the first pdf path. We assume this file exists
'' Use the FindExecutable API function to grab the path to our PDF handler.
'' This should be Acrobat Reader or Acrobat, but it might be something else.
'' When we try to DDE link to it, non-acrobat will error out. This is ok.
sAcroPath = String(128, 32)
lStatus = FindExecutable(sPDFPath, vbNullString, sAcroPath)
If lStatus <= 32 Then
MsgBox "Acrobat could not be found on this computer. Printing cancelled", vbCritical, "Problem"
Exit Sub
End If
'' Launch the PDF handler
lStatus = Shell(sAcroPath, vbHide)
If (lStatus >= 0) And (lStatus <= 32) Then
MsgBox "An error occured launching Acrobat. Printing cancelled", vbCritical, "Problem"
Exit Sub
End If
bCloseAcrobat = True '' We will try to close Acrobat when we are done
End If
PauseFor 2 '' Lets take a break here to let Acrobat finish loading
Error282Count = 0 '' This time, we will allow all acceptable tries, as
AcroDDEFailed = False '' Acrobat is running, but may be busy loading its modules
txtAcrobatDDE.LinkMode = 0
txtAcrobatDDE.LinkTopic = "acroview|control"
txtAcrobatDDE.LinkTimeout = 2500 ' 3 minute timeout delay. Should be moer than enough
txtAcrobatDDE.LinkMode = 2
If AcroDDEFailed = True Then
MsgBox "An error occured connecting to Acrobat. Printing cancelled", vbCritical, "Problem"
Exit Sub
End If
'' Send the PDF's to the printer. In my testing, this was very immediate
For n = 0 To UBound(PDFArray)
'' We need to put the long filenames in quotes. Again, we assume these file exist
sPDFPath = PDFArray(n)
sCmd = "[FilePrintSilent(" & Chr(34) & sPDFPath & Chr(34) & ")]"
txtAcrobatDDE.LinkExecute sCmd
Next
If bCloseAcrobat = True Then
'' [AppExit()] causes memory errors with v6.0 and 6.1, so avoid closing these versions
If InStr(sAcroPath, "6.0") = 0 Then
sCmd = "[AppExit()]"
txtAcrobatDDE.LinkExecute sCmd
End If
End If
'' Close the DDE Connection
txtAcrobatDDE.LinkMode = 0
Exit Sub
ErrHandler:
If Err.Number = 282 Then '' Can't open DDE channel
'' This error may happen because Acro is not fully loaded.
'' Give it Max282Errors attempts before returning AcroDDEFailed = True
Error282Count = Error282Count + 1
If Error282Count <= Max282Errors Then
PauseFor 3
Resume
Else
AcroDDEFailed = True
Resume Next
End If
End If
MsgBox "Error in PrintPDFs sub of " & Me.Name & " form. Error# " & Err.Number & " " & Err.Description & "."
End Sub
Private Sub PauseFor(iSeconds As Integer)
'' Pauses for iSecond seconds
Dim sngTimer As Single
sngTimer = Timer
While Timer - sngTimer < iSeconds
DoEvents
Wend
End Sub
|
|
|
|
|
The error says that you don't have something called "txtAcrobatDDE" defined anywhere. From the example code you posted, I'm assuming this would be a textbox control named "txtAcrobatDDE".
|
|
|
|
|
Hi Dave,
Thanks for your continuous responses... I can can now print PDF files...
Thanks a lot...
|
|
|
|
|
hi. how can I convert a string to integer? I'm doing a program in VB were you are required to input a
mathematical formula in a single input box and value each of the integer. But when I use the Left command,
the formula of the textbox are converted into string type and won't compute the value as in the formula
indicated. I really need your help. thanks..
|
|
|
|
|
There is nothing built into VB.NET or the .NET Framework that's going to evaluate expressions typed into a textbox. You have to create your own expression parsing engine to break the input down into something you can do the math on, piece-by-piece. Google for "Reverse Polish Notation" for an intro to expression engines. There are certainly other implementations to do this, but RPN is good place to start.
|
|
|
|
|
Hi,
If U want to convert text in to integer then simply U can use it:-
<br />
dim s as string<br />
dim i as integer<br />
<br />
s="200"<br />
i=val(s) 'This function converts the string in integer<br />
<br />
<br />
Best Of Luck
|
|
|
|