|
Why would you want to do this ?
One way would be to put a window over the desktop, which is transparent, and doesn't appear in the taskbar.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm working on a project in school to lock public computers and to regain access with a PIN code..
Yes, I've thought of that myself but this can be ignored by switching to another app with CONTROL - TAB, no?
Regards
|
|
|
|
|
If the window were set to always on top it wouldn't matter if they used alt-tab. Although the most secure way (relatively speaking) would be to logout.
only two letters away from being an asset
|
|
|
|
|
just catch the keydown events
greetings
|
|
|
|
|
You can catch an event when your form loses focus, and bring it back to the front. But, yes, logging out is the best way to do it, Windows is already built around that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Thank you guys for your input I greatly appreciate it
|
|
|
|
|
Hi Developer Folks,
Now my task is to create the application which can be accessed by any database.
Please advice me which tool is the best to do the Above mentioned thing and If not possible tell me some other way to achieve the same
Please mail me at jabeerbe@gmail.com for your answers.
Regards,
A Jabeer Ali
|
|
|
|
|
Jabeerbe wrote: Now my task is to create the application which can be accessed by any database.
Really, any app should be able to do that, simply by replacing the data layer.
Jabeerbe wrote: Please mail me at jabeerbe@gmail.com
The only people who will email you, are the people who trawl the web for addresses to send spam to. If you gave this address when you registered, you'd get an email automatically.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi I got a dataset contains three table table(0), table(1), table(2)
table(0) contains
CustID OrderID
1001 10001
1003 10002
1007 10003
1012 10004
1012 10005
Now I would like to create a query like [sqlQuery = "Select * CustID Where CustID Between 1001 and 1010"]
I would like to put this query result into table(1)
Is it possible? If so how can I do it?
Thanks
Sarfarj Ahmed
|
|
|
|
|
My first thought would be to do a selected on table0 and replace the rows in table1 with the resulting rows collection.
only two letters away from being an asset
|
|
|
|
|
thanks for ur reply
What Im trying to do is.........
I got Sql Server Database. One of the table name Volume which is related with five other tables. From Volume table I need to create two other table (VolumeSectors and VolumeThemes) then I need to create some query, where I want to use VolumeSectors and VolumeThemes tables instead of Volume tables.
So far what I have done...........
Added a DataSet into my Project where I have added three tables name Volume, VolumeSectors and VolumeThemes. I have already run a Query to pull all data from Volume Table (Sql Server Database) and put it on DataSet.Volume. Now I need to pull data from DataSet.Volume (specified data (need to write query)) and put it into VolumeSector and VolumeThemes on the basis of query.
Please help me............
If you can write some code for me
I have put data into DataSet.Volume with the following functions below
Public Function Qry_Volume() As DataTable
Dim _DataSet As DataSet = New Publications()
Dim _Qry_Volume_VolumeLessons_Table As DataTable = New DataTable()
Dim _Qry_Volume_Sectors As DataTable = New DataTable()
Dim con As AccessDatabase = New AccessDatabase()
Dim conLessons As SqlConnection = con.SQLConnnect()
Dim cmd As SqlCommand = New SqlCommand()
Dim _DataReader As SqlDataReader
Try
conLessons.Open()
cmd.CommandType = CommandType.Text
cmd.Connection = conLessons
cmd.CommandText = "Select V.Title, V.Voltype, V.Region, VL.Lesson From VolumeLessons VL Inner Join Volumes V ON VL.Volume = V.AutoID Order BY V.Title ASC "
_DataReader = cmd.ExecuteReader()
If _DataReader.HasRows Then
_DataSet.Tables(0).Load(_DataReader)
_DataReader.Close()
conLessons.Close()
End If
Catch ex As Exception
If conLessons.State = ConnectionState.Open Then
conLessons.Close()
End If
End Try
Return _DataSet.Tables(0)
conLessons.Close()
End Function
** Now how can I do it?
Thanks
Sarfarj Ahmed
|
|
|
|
|
If the tables in the dataset are related you can create a relationship and get the child rows from VolumeSectors and VolumeThemes that are related to those in the Volume table
only two letters away from being an asset
|
|
|
|
|
I want to print a float with value 1.98765 with only 2 decimals: (1.99 in this case).
How?
_____________________________
...and justice for all
APe
|
|
|
|
|
myFloat.ToString(0.##);
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Numeric Format Strings[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
hello
my name surjeet singh how can i change start menu name like "start" to "sidhu" in windows xp sp2.
surjeet_sidhu2007@hotmail.com
surjeet singh sidhu
|
|
|
|
|
A couple of things.
1. Don't put your email address in the post.
2. How is this a C# question?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Programmatically you would have to get a handle of the window and then change the window text of the start button window. Programmatically you would have to use API. Otherwise you could use Resource Hacker to alter the dlls of the OS.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
hey,
When I'm trying to delete one of my created files. My program saids it is in use (by himself) but that's because the program is to fast. When I let him wait 10sec the lock is gone... But that not zo good if you have to delete 20-50 files.
How can I unlock them automatically?
Thx!!!
|
|
|
|
|
How are the files created? Did you maybe forgot to call close on some streams?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
There are all created with:
new DirectoryInfo(Path.GetDirectoryName(path)).Create();
StreamWriter writer = new StreamWriter(path);
writer.WriteLine(content);
writer.Close();
But than the locks are fine. But after all the files are created I zip them with "SharpZipLib" and is places locks that last realy long...
thx
|
|
|
|
|
Then there's a bug in the zip library, or in how you're using it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I don't think so everything is closed:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Threading;
using log4net;
using ICSharpCode.SharpZipLib.Zip;
using System.Collections;
using System.Collections.Specialized;
namespace InterfaceCollector.domain.DAL
{
class Zip
{
private string destination;
private readonly ILog log = LogManager.GetLogger(typeof(Zip));
static Hashtable excludeDirs = new Hashtable();
static string startFolder = String.Empty;
static string outputZipPath = String.Empty;
static string password = String.Empty;
public Zip() {}
static private Zip instance = null;
static public Zip Instance
{
get
{
if (instance == null)
instance = new Zip();
return instance;
}
}
public void ZipIt(string Path,string password)
{
log4net.LogManager.Shutdown();
try
{
ArrayList ar = GenerateFileList(Path); // generate file list
// find number of chars to remove from orginal file path
int TrimLength = (Directory.GetParent(Path)).ToString().Length;
TrimLength += 1; //remove '\'
FileStream ostream = null;
byte[] obuffer;
ZipOutputStream oZipStream = new ZipOutputStream(System.IO.File.Create(Destination)); // create zip stream
if (password != String.Empty) oZipStream.Password = password;
oZipStream.SetLevel(9); // 9 = maximum compression level
ZipEntry oZipEntry;
DateTime timeStap = DateTime.Now;
string output = "";
int lenghtWrittenString = 0;
double percent = 1;
int countFiles = 0;
foreach (string Fil in ar) // for each file, generate a zipentry
{
countFiles++;
percent = countFiles * 100 / ar.Count;
//Display % on progressScreen
if (timeStap <= DateTime.Now)
{
timeStap = DateTime.Now.AddMilliseconds(1000);
ApplicationDirector.Instance.removeCharachtersFromProgressScreen(lenghtWrittenString);
if (percent < 100.0)
{
output = "\r\nCreating zip-file (" + percent + "%)";
ApplicationDirector.Instance.writeToGui(output);
}
lenghtWrittenString = output.Length;
}
oZipEntry = new ZipEntry(Fil.Remove(0, TrimLength));
oZipStream.PutNextEntry(oZipEntry);
if (!Fil.EndsWith(@"/")) // if a file ends with '/' its a directory
{
ostream = File.OpenRead(Fil);
obuffer = new byte[ostream.Length]; // byte buffer
ostream.Read(obuffer, 0, obuffer.Length);
oZipStream.Write(obuffer, 0, obuffer.Length);
}
}
ApplicationDirector.Instance.removeCharachtersFromProgressScreen(lenghtWrittenString);
ApplicationDirector.Instance.writeToGui("\r\nCreating zip-file (Completed)");
oZipStream.Finish();
oZipStream.Close();
}
catch (Exception ex)
{
ApplicationDirector.Instance.writeToGui("Error during zipping.");
Logger.Instance.ExtraInfo.Add("Zip-File nog created" + ex);
}
}
private static ArrayList GenerateFileList(string Dir)
{
ArrayList mid = new ArrayList();
bool Empty = true;
foreach (string file in Directory.GetFiles(Dir)) // add each file in directory
{
mid.Add(file);
Empty = false;
}
if (Empty)
{
if (Directory.GetDirectories(Dir).Length == 0) // if directory is completely empty, add it
{
mid.Add(Dir + @"/");
}
}
foreach (string dirs in Directory.GetDirectories(Dir)) // do this recursively
{
// set up the excludeDir test
string testDir = dirs.Substring(dirs.LastIndexOf(@"\") + 1).ToUpper();
if (excludeDirs.Contains(testDir))
continue;
foreach (object obj in GenerateFileList(dirs))
{
mid.Add(obj);
}
}
return mid; // return file list
}
public string Destination
{
get { return destination; }
set
{
string path = Path.GetDirectoryName(value);
path = path + "Agfa Zip - "+Path.GetFileNameWithoutExtension(value) + "\\" + Path.GetFileName(value);
destination = path;
Directory.CreateDirectory(Path.GetDirectoryName(destination));
}
}
}
}
|
|
|
|
|
But you have to know, he releases the locks It just takes to long
|
|
|
|