|
Erik Lirttle wrote:
ddlCompanyName.DataSource = GetData(ddlCustomers.SelectedValue).CompanyName
I'm not sure what the .CompanyName property is supposed to do here, but a getdata function that takes the selected value and filters on it is the right idea.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to make a program which doesn't allow any how to go focus out of him not even the mouse cursor goes out the window and I even want to trap the message ctrl+alt+del,so that my process can't be killed.
|
|
|
|
|
There are more ways to stop a process than just pressing Ctrl+Alt+Del. Perhaps if you tell us why you want this functionality there may be a way to do something just as well but with a different solution. I know I'd feel pretty irritated if I used a program that forced the focus to it and didn't allow me to stop it running - the only reasons I can think of that you'd want to do this are not good reasons.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
While this may be a good idea for a kiosk application, it's just plain idiotic to do it in any other circumstance.
Also, you can't trap Ctrl-Alt-Del, unless, that is, you want to write a new GINA.DLL...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to hide my executing process in task manager.How can I?
|
|
|
|
|
|
You can't!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You just hide your appications in task manager's application list not in process list. you just have to do
form_load
app.TaskVisible=False
end sub
|
|
|
|
|
That only works in VB6 and only if the application doesn't show an interface.
If you read the documentation:
The TaskVisible property can only be set to False in applications that do not display an interface, such as ActiveX components that do not contain or display Form objects. While the application displays an interface, the TaskVisible property is automatically set to True.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to know how toexecute the program in v.b. before the login screen appears, and how to abort the system shutdown , I uses the abortsystemshutdown function but it works only in win98 and even in win 98 after calling the function the system shows the message not responding.
|
|
|
|
|
Anonymous wrote:
I want to know how toexecute the program in v.b. before the login screen appears,
This is a Windows Service application.
Anonymous wrote:
and how to abort the system shutdown
Why on earth would you want to do this? It's a VERY bad idea considering the only way you'd be able to shut down the system is to power off the machine. This, of course, runs the risk of corrupting Windows, the pagefile, the file system, ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have been working on this problem for the last couple of days and have not been able to come up with a solution. This is probably due to my lack of experience building composite controls.
I am trying to fill the objMonthEvents array inside the CtlCal_DayRender handler then use that array in the CreateChildControls sub procedure.
The idea is to build a second control that would detail information gathered in the CtlCal_DayRender sub.
Thanks for any help in how I am trying to accomplish this or correcting the code detailed so it will work!
Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Drawing.Color
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.OleDb
Imports System.Collections
Namespace nsTest1
Public Class clsTest1
Inherits Control
Implements INamingContainer
Dim objMonthEvents = New ArrayList()
Protected Overrides Sub CreateChildControls()
Dim CtlCal As New Calendar()
CtlCal.ID = "Calendar1"
CtlCal.SelectionMode = CalendarSelectionMode.Day
CtlCal.Font.Size = FontUnit.Point(8)
CtlCal.DayHeaderStyle.Font.Bold = True
CtlCal.OtherMonthDayStyle.ForeColor = System.Drawing.Color.Gray
CtlCal.DayNameFormat = DayNameFormat.FirstLetter
CtlCal.SelectorStyle.BackColor = System.Drawing.Color.FromArgb(&H99CCFF)
CtlCal.BorderStyle = BorderStyle.None
CtlCal.CellSpacing = 2
CtlCal.TitleStyle.BackColor = System.Drawing.Color.FromArgb(&H2F8DBE)
CtlCal.TitleStyle.ForeColor = System.Drawing.Color.White
CtlCal.TitleStyle.Font.Bold = True
CtlCal.SelectedDayStyle.BackColor = System.Drawing.Color.FromArgb(&HFCFAD7)
CtlCal.SelectedDayStyle.ForeColor = System.Drawing.Color.Black
CtlCal.SelectedDayStyle.Font.Bold = True
CtlCal.NextMonthText = ""
CtlCal.PrevMonthText = ""
AddHandler CtlCal.DayRender, AddressOf CtlCal_DayRender
Me.Controls.Add(CtlCal)
Dim i As Integer
For i = 0 to objMonthEvents.Count - 1
HttpContext.Current.Response.Write(objMonthEvents(i)) '-- process array value
Next
End Sub
Public Sub CtlCal_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs)
objMonthEvents.Add("This is a test")
End Sub
End Class
End Namespace
Regards:
Steve
|
|
|
|
|
I am new to .Net and am programming in VB.Net.
Printing a Form in a report fashion (release 2.2)
By sylvain2222 is code in The Code Project.
I tried to download the demo code and use it but I keep getting compile errors as these below:
C:\Inetpub\wwwroot\PrintingFormDemo\FormPrinting\FormPrinting.cs(45): The type or namespace name 'HorizontalAlignment' could not be found (are you missing a using directive or an assembly reference?)
C:\Inetpub\wwwroot\PrintingFormDemo\FormPrinting\FormPrinting.cs(61): The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?).
I am not a C# programmer but I would like to use slvain2222 code in my VB.Net project. However, I cannot even get the demo to compile.
If I ever get it to compile, how do I incorporate it into my VB.Net project?
Thanks for any help given.
MrMagic
|
|
|
|
|
This is the source code
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Data.SqlClient
Imports System.Data
Private str_connection As String = "workstation id=""MAX-IT10Q0"";packet size=4096;integrated security=SSPI;initia" & _
"l catalog=Addressbook;persist security info=False"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cnsql As SqlConnection
Dim load_dataset As New DataSet
Dim rpt As ReportDocument
Dim str_query As String
rpt = New ReportDocument
rpt.Load("..\CrystalReport2.rpt")
cnsql = New SqlConnection(str_connection)
cnsql.Open()
str_query = "select name,Address from tb_abook"
Dim load_adapter As New SqlDataAdapter(str_query, cnsql)
load_adapter.Fill(load_dataset, "tb_abook")
rpt.SetDataSource(load_dataset)
CrystalReportViewer1.ReportSource = rpt
End Sub
Report :Crystelreport 9.0
Os: XP
visual studio.net 2003
Username: jeeva
Password: vk26353
Continue...
|
|
|
|
|
I have built a web form in VB.Net ver 1.0 using .Net Framework 1.1.
I have 2 data grids and some text boxes. I need to be able to print the form but I have a few problems.
1] The data grid extends to multiple pages. I could skip paging and have one long page but then the printing of the grid would be compromised.
2] I tried to use the embedded Crystal Reports to create a report that could be printed. This worked great except that the hosting web site is a shared hosting site and does NOT support Crystal Reports. I then tried to create a .MSI file but the site would not execute the Windows Ibstaller.
3] I then found this code in The Code Project:
Printing a Form in a report fashion (release 2.2)
However, I cannot get it to work with my web form.
Maybe it only works for Windows forms. I am not sure.
I am relatively new to the .Net arena and am not sure how to incorporate the FormPrint.CS code with my .Net project.
The code was written by Sylvain2222 in The Code Project
If anyone knows how I can print my web form please help.
Thanks for any help given.
|
|
|
|
|
If u have a windows form which form have a multiple textbox connected a database, like NAME,SURNAME,MOTHERNAME,FATHERNAME ...etc and i want to write code for get button..
If user fill only NAME textbox GET button must bring data in Datagrid from database where NAME=txtname.text, but if user fill some different textbox like NAME and MOTHERNAME GET button must bring data in datagrid from database where NAME=txtname.text AND MOTHERNAME=txtmname.text. Or different much more criteria.
Sorry for my bad English and thank you for your valuable replies about my problem
MAGICIANMERLIN
|
|
|
|
|
Your text box has a Text property, which has a Length property. There's also a Trim() method you can call first to remove whitespace. You can then build a query from there. Or you can use LIKE so that an empty string in any field returns all values for that field.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you for your helping but i can not imagine which kind of query i must create.I think i need different where query.Select * from MAINDATA where ????? i have a lot of textbox and i need query for all of them which i must use at the sametime AND OR but i can not use...
If one textbox is filled no problem i can do it but like if textbox1 and textbox5 was filled it must be example where textbox1.text=xxxxx AND textbox5.text=xxxxx....
I am just learning vb.net if i ask some unmeaned think i am sorry for that..
Thanx a lot
|
|
|
|
|
MAGICIANMERLIN wrote:
If one textbox is filled no problem i can do it but like if textbox1 and textbox5 was filled it must be example where textbox1.text=xxxxx AND textbox5.text=xxxxx....
Yes, that is right. You build the query dynamically, and AND is the SQL keyword you need, exactly as you put it.
Select * from Maindata where name='theName' AND address = 'myAddress' etc
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need a VB prog that reads any incoming msg,,
gets sender email, subject, time_date of sending and body
of the msg..
thank u so much
A.Dhiab
|
|
|
|
|
|
thank u so much KaptinKrunch
but i still have some confusions about..
thanks again
A.Dhiab
|
|
|
|
|
I Work with VB.Net And use extarnal component to add in my project .The project in SetUp is Slow ,Some freinds said to me that C# is Quicker than VB.NET
The Quuestion:
IS this true ,if so ,What the Solution
|
|
|
|
|
If I'm not mistaken, C# and VB.net both compile to the same intermediate language (assembly). I read somewhere on MSDN that VB.net and C# executed at very close to the same speed.
If you want speed, you'll need a language that compiles to native code like visual C++.
|
|
|
|
|
Neither is quicker than the other. They both compile to the same Intermidiate Language.
Speed has two factors. The first (and largest contributor) is proper coding technique. The second is how close to machine code you want to write it in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|