|
Well I have done this around 5 years back in VB6. So dont have the code but I think that I found the sample code from www.VBCode.com by that time. check there if this helps....
remember one thing.. while coding I made some mistake by that time and it results in my window re-installation.. so be careful while changing the code...
Best of luck...
|
|
|
|
|
hello!
i have to programm a remote desktop app in vb.net (because the whole project is in vb.net) and i don't know how to do so?
does anyone have code or can help me?
it is really urgent!
thanks!
|
|
|
|
|
Reinhard Taucher wrote:
i have to programm a remote desktop app in vb.net (because the whole project is in vb.net) and i don't know how to do so?
That is very vague. Can you be more specific? For example, what do you mean by a "remote desktop app"? Is this an application that will be run through a remote desktop connection? Or do you want to programatically control a remote desktop connection? Or what?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
Hi
I'm trying to use a .Net User Control in a VB6 Form.
I've created the control, as a class of a class library, adding references to System.Windows.Form. The class inherits from UserControl and implent an interface that is suposed to expose the control's methods to com:
Class declaration:
<guidattribute("8dfe85ee-604a-4350-b4fc-8b6e97cc1a08"), _
classinterface(classinterfacetype.none)=""> _
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
Implements IUserControl1
'Constructor and initialize components
public function doSomething() as string
return "hello"
end function
End Class
' Interface
Imports System.Runtime.InteropServices
<interfacetypeattribute(cominterfacetype.interfaceisiunknown)> _
Public Interface IEJSimple
function doSomething() as string
End Interface
Then i execute de tlbexp and regasm commands and create a new project in visual basic 6 with reference to the tlb generated with tlbexp.
with this code:
Private Sub Form_Load()
Dim o As Object
Set o = Me.Controls.Add("mySolution.UserControl1", "o")
o.Visible = True
End Sub
I can add the control to the VB6 form i'm not able to call the doSomething() method. The error i get is "the object does not admit that property or method(error #438)"
I also tried to add the control to the VB form as follow:
Dim o As mySolution.UserControl1
Set o = Me.Controls.Add("mySolution.UserControl1", "o")
But i get a type missmatch error.
¿What is wrong with this o what i'm forgetting?
Thanks
|
|
|
|
|
Hai..
I need to display the wave signal from MP3 file. Please help me any body have idea. Otherwise give me some related information.
Thanks,
e.veera raghavendra
|
|
|
|
|
|
That will display the wave signal from the wave file. But, i need to display the wave signal from MP3.
Thanks,
e.veera raghavendra
|
|
|
|
|
I am working on a Custom Draw ListView. So far it looks pretty good. I am going off the cade from fotovision from Microsoft. The problem I am having is how to make the listviewitem's bounds bigger to fit the site of the custom drawn item.
Any ideas?
|
|
|
|
|
Figured it out...use a imagelist and set the imagelist image size to the size I need
|
|
|
|
|
Hi All,
I just findout a special button control: AquaButton for .NET for my application. I think it's really cool.
http://www.econtechvn.com/en/aquabutton_detail.htm
But anyone tried this before?
I'm going to buy it and I need your comments.
Thanks,
NicVan
|
|
|
|
|
You're going to buy it - why do you need our comments ? This sounds like an ad to me.
Either way, don't crosspost this crap here, it's not appropriate. Try the lounge if you haven't already and you really want to post this stuff.
$61 for a lousy button ? You must be kidding.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'll read 512 bytes from a file with loop.Using API function CreateFile() open file and using API function ReadFile read file.generally,the file pointer auto move 512 bytes,but the file pointer not move,always at begin head.How to move file pointer.
|
|
|
|
|
It does move on it's own. How are you reading the file and why are you using the Win32 API to do this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
hellow to all
i am looking for a tutorial or code on working with graphics in vb .
like building Rectangels and ellipse , filling them and all this stuff ..
where can i find ?
thxx a lot
|
|
|
|
|
VB6 or VB.NET ? msdn.microsoft.com has all the GDI+ docs for VB.NET, and my GDI+ articles translate pretty easily to VB.NET also.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, can anyone help give me the sample code on how to display the record from access or sql server on crystal report in vb.net 2003?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Here is the way how to Display records on Crystal report from SQL Server. Suppose You have a database with the name MyDatabase which contains many tables and you want to display records from table1 . To do so you've to follow these steps
1) First Create a new form Say MyReportForm then add
Crytalreportviewer from toolbox
2) Now suppose you want to show the roport when user clicks the Report button .Add follwing lines at top of the form which contains Report button
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
3)Write the following code in the click event for Report button .
Dim FRM As New MyReportForm
Dim rpt As New MyReport
try
Dim LogInfo As New TableLogOnInfo()
Dim LogInfos As New TableLogOnInfos()
LogInfo.ConnectionInfo.ServerName = "."
LogInfo.ConnectionInfo.DatabaseName = "MyDatabase"
LogInfo.ConnectionInfo.UserID = "MyUserName"
LogInfo.ConnectionInfo.Password = "Mypassword"
LogInfos.Add(LogInfo)
rpt.Refresh()
FRM.CrystalReportViewer1.LogOnInfo = LogInfos
( FRM.CrystalReportViewer1.SelectionFormula = "{Table1.SomeField} = " & SomeCriteria & " " )
FRM.CrystalReportViewer1.ReportSource = rpt
catch ex as exception
msgbox(ex.Message & ex.stackTrace)
End Try
Note that Statement in paranthesis is optional only if you want to show records by filtering on the basis of some criteria.
|
|
|
|
|
Thank you very much for your answer. But I have a problem with
TheOnlyFalcon wrote:
Dim rpt As New MyReport
this line and
TheOnlyFalcon wrote:
FRM.CrystalReportViewer1.LogOnInfo = LogInfos
( FRM.CrystalReportViewer1.SelectionFormula = "{Table1.SomeField} = " & SomeCriteria & " " )
this line.
The first one is not recognized by the vs.net. It appear the blue line under it. The second one is not correct. Can you give some more reallity example?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Oops!!!!!!!!! Two problems
Your first problem is becuase you may have not added a report to your project to do so from solution explorer right click your project then select add new item from the dialog box selec crystalreport and assign it any suitable name "MyReport" in this case VS.NET will create a class for your report.
Your second problem is because you may not have added a crystal report viewer add it from toolbox if you have still problems then contact me at cyberboy_137@hotmail.com
Many regards
|
|
|
|
|
Thank you very much for your comment. I have correct the problem and the code could run without any error. But there is nothing appear on the screen. Here is my code that I used:
Private Sub Button1_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim FRM As New MyReportForm
Dim rpt As New MyReport
Try
Dim LogInfo As New TableLogOnInfo
Dim LogInfos As New TableLogOnInfos
LogInfo.ConnectionInfo.ServerName = "."
LogInfo.ConnectionInfo.DatabaseName = "VSA"
LogInfo.ConnectionInfo.UserID = "kanel"
LogInfo.ConnectionInfo.Password = "scn-co"
LogInfos.Add(LogInfo)
rpt.Refresh()
FRM.CrystalReportViewer1.LogOnInfo = LogInfos
FRM.CrystalReportViewer1.SelectionFormula = _
"{tblAnalysesChildCase.ChildName} = 'eQOn eGOn'" ' & SomeCriteria & " ")
FRM.CrystalReportViewer1.ReportSource = rpt
FRM.CrystalReportViewer1.Show()
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End Sub
Thank for your help!!
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
The problem might be the case of following line .
FRM.CrystalReportViewer1.SelectionFormula = _ "{tblAnalysesChildCase.ChildName} = 'eQOn eGOn'" ' & SomeCriteria & " ")
Actualy this will be interpreted as like a WHERE clause so
if you want to show filtered data on report then you have to use "Correct selelectionFormula" Here i can see you have not written the proper selection formula .
Example
Suppose you want to show the records of those whose ages are under 12 and you have combobox named "cboages" filled with ages of children and the daatbase field is "Child_Age" .Select 12 from cboages then click Button1 or whatever your button name is .
frm.crystalreportviewer1.SelectionFormula="{tblAnalysisChildcase.Child_Age}= " & cboages.text & " "
And to filter data on the basis of some text not numberic value use single quotes
Example
Show records for Allen
you have a textbox named txtname
Enter Allen then click your button .
frm.crystalreportviewer1.SelectionFormula="{tblAnalysisChildcase.ChildName}= '" & txtName.text & "' "
Your problem must be solved now , if there are still problems you can contact me
Bye
|
|
|
|
|
Hello all,
Does anybody have any idea how to detect mdb files. I really need some advice here. Maybe i should briefly explain what i am doing now.
I am working on this program where i have to print a report for Buyer's Info, Buyer's Label, Supplier's Info and Supplier's Label. Both Buyer & Supplier have a seperate database (SA1.mdb & SA2.mdb). I have created a form with two listbox. The first listbox will load & display the number of mdb files i have in the project folder. In this case i have two (SA1 and SA2). When i select either one from the first listbox, lets say SA1 which is the database for Buyer, the second listbox will then display Buyer Info & Buyer Label vice versa. Then when i select either one of them from the second listbox and proceed to the generate report button, the report will be printed accordingly.
Hmm... does anybody know how to do that? really looking forward to an answer. Thank you!
|
|
|
|
|
VB6 or VB.NET ? In VB.NET you can use Directory.FindFiles, which takes a filter, so you can get an array of filenames that end in .mdb.
Christian Graus - Microsoft MVP - C++
|
|
|
|